import { useState } from "react";
import Screen from './Screen'
const Computer = () => {
    const [status, serStatus] = useState(false)
    const toggle = () => {
        serStatus(!status)
    }
    return (
        <div>
            Computer
            <button onClick={toggle}>开关</button>
            {/* 父子组件传值 */}
            <Screen logo="民间" showContent={status?'显示器亮':'显示器关闭'}/>
        </div>
    )
}
export default Computer